//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopActivity, MinishopActivityResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopActivityList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopActivityResponse>(`/uctoo/minishop_activity/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopActivity = async (id: string) => {
  return requestClient.get<MinishopActivity>(`/uctoo/minishop_activity/${id}`);
};

export const adductooMinishopActivity = async (data: Partial<MinishopActivity>) => {
  return requestClient.post<MinishopActivity>('/uctoo/minishop_activity/add', data);
};

export const edituctooMinishopActivity = async (data: Partial<MinishopActivity>) => {
  return requestClient.post<MinishopActivity>('/uctoo/minishop_activity/edit', data);
};

export const deleteuctooMinishopActivity = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_activity/del', { id });
};
